#pragma once
#include <vector>
#include "libutilsbase.h"
#include "ProductDefinition.h"
#include "DBFReader.h"
#include "threadtask.h"


class DBFQUOTEAPI CShow2003Parser : public LIB_NS::ThreadTask
{
public:
	CShow2003Parser(void);
	virtual ~CShow2003Parser(void);
	virtual bool Open(const char* path);
	bool Check();
	int GetDBDate();
	
	void Close()
	{
		m_reader.Close();
	}
	

	static bool GetStockAttrib(const char* code,StockAttribute* attrib);
	bool GetStockInfos(std::vector<StockAttribute>* pstocks);

	bool ScanSource();

	virtual int svc();

	bool SetParam(CDBFQuoteParam param)
	{
		return true;
	}

	



private:
#pragma warning(disable : 4251)
	//std::vector<ProductDBInfo> m_ProductsToScan;
	CDBFReader m_reader;
	std::string m_path;
	CDBFQuoteParam m_param;
	int m_dataDate;
};